package yunwo.cn.yzstation.api.okapi;

import com.google.gson.Gson;
import com.zhy.http.okhttp.callback.Callback;

import okhttp3.Response;
import yunwo.cn.yzstation.bean.LoginBean;
import yunwo.cn.yzstation.bean.UserInfoBean;

/**
 * Created by lao on 2017/9/6.
 */

public abstract class UserInfoCall extends Callback<UserInfoBean> {

    @Override
    public UserInfoBean parseNetworkResponse(Response response, int id) throws Exception {
        String string = response.body().string();
        UserInfoBean bean = new Gson().fromJson(string, UserInfoBean.class);
        return bean;
    }
}
